setTimeout(init, 2000);
function init() {
  let operationCenter = document.querySelector(".operation-center");
  if (!operationCenter) {
    return;
  }
  let button = document.createElement("button");
  let height = "36px";
  let radius = "18px";
  button.style.cssText = `background-color:blue;
  color:white;
  padding: 0 10px;
  line-height:${height};
  height:${height};
  border-radius:${radius};`;
  button.innerText = "ShowVW";
  button.onclick = function () {
    searchAnnotationItems();
  };
  operationCenter.prepend(button);
}

function searchAnnotationItems() {
  document.querySelectorAll(".annotation_item").forEach(function (item) {
    item.querySelectorAll(".two").forEach(function (two) {
      let text = two.innerText;
      //text end with px
      if (text && text.endsWith("px")) {
        let px = text.replace("px", "");
        //px to int
        px = parseInt(px);
        two.innerText = (100*(px / 375)) + "vw";
      }
    });
    // let subTitle = item.querySelector(".subtitle");
    // if (subTitle) {
    //   console.log("annotation-item-title", subTitle.innerText);
    // }
  });
}
